#include "heroplane.h"
#include"config.h"

heroplane::heroplane()
{
    //初始化加载飞机图片及资源
    m_Plane.load(HERO_PATH);
   // m_Plane1.load(NOMOVE);
    //初始化飞机坐标
    m_X=(GAME_WIDTH-m_Plane.width())* 0.5;
    m_Y=(GAME_HEIGHT)-m_Plane.height();
//初始化矩形边框
   m_Rect.setWidth(m_Plane.width()-9);
   m_Rect.setHeight(m_Plane.height()-9);
   //把位置放到指定坐标处
   m_Rect.moveTo(m_X,m_Y);

}

void heroplane::shoot()
{
}

void heroplane::setPosition(int x, int y)
{
m_X=x;
m_Y=y;
m_Rect.moveTo(m_X,m_Y);
}
